/**
 * @description: 获取图片信息
 * @author: 王琛
 * @Date: 2022-08-15 16:06:50
 * @param {*}
 * @return {*}
 */
export function getImage(name) {
    const path = "/src/assets/images" + name;
    const modules = import.meta.glob("/src/assets/images/**/*.{png,svg,jpg,jpeg,mp3}", {eager: true});
    if (modules[path]) return modules[path]["default"]
}

/**
 * @description: 获取静态资源
 * @author: 王琛
 * @Date: 2023-07-07 10:43:50
 * @param {*}
 * @return {*}
 */
export function getPublic(name) {
    const path = "../../../public/" + name;
    const modules = import.meta.glob("../../../public/**/*.{png,svg,jpg,jpeg}",);
    if (modules[path]) return modules[path]["default"]
}
